package Service

import (
	"gin/study_1/Models"
)

type In_Stu_ser struct {
	Info string `json:"info"`
	Models.Student
}


// 插入一个Student信息
func (this *In_Stu_ser) InsertStudent() (id int,err error) {
	var Student Models.Student
	Student.Id=this.Id
	Student.Age = this.Age
	Student.Number = this.Number
	Student.Sex = this.Sex
	Student.Name = this.Name
	id ,err = Student.Insert()
	return
}

// 查询所有的Student信息
func (this *In_Stu_ser) SelectAllStudent()(result []Models.Student)  {
	var Student Models.Student
	result = Student.SelectAll()
	return
}
